OTDestroyDeferredTask
Destroys a deferred task created with theOTCreateDeferredTask
function.C INTERFACE
OSStatus OTDestroyDeferredTask(long dtCookie)C++ INTERFACES
None. C++ applications use the C interface to this function.PARAMETERS
dtCookie
- A reference that identifies the task to be destroyed.
DESCRIPTION
TheOTDestroyDeferredTask
function makes thedtCookie
reference invalid and frees any resources allocated to the task when it was created. You can call this function at any time when you no longer need to schedule the deferred task object. IfdtCookie
is invalid (a value of 0), the function returnskOTNoError
and does nothing.If you try to destroy a deferred task that is still scheduled, the
kEAgainErr
error can occur. This is a rare situation that can only happen when you try
to destroy the task from within an interrupt service routine or within
another deferred task.SEE ALSO
To create a deferred task object for execution at deferred task time, call theOTCreateDeferredTask
function (page 7-14).To schedule a task for execution at deferred task time, call the
OTScheduleDeferredTask
function (page 7-17).